import config from "../../config/index.js";
import http from "../../utils/request.js";

export default {
    addTenant: {
        url: `${config.API_URL}/platform/tenant/add`,
        name: "新增租户",
        post: function (platformTenantAddVo) {
            return http.post(this.url, platformTenantAddVo);
        }
    },
    delTenants: {
        url: `${config.API_URL}/platform/tenant/del`,
        name: "多选级联删除租户",
        delete: function (tenantIds) {
            return http.delete(this.url, tenantIds);
        }
    },
    editTenant: {
        url: `${config.API_URL}/platform/tenant/edit`,
        name: "修改租户信息",
        put: function (platformTenantEditVo) {
            return http.put(this.url, platformTenantEditVo);
        }
    },
    getTenantById: {
        url: `${config.API_URL}/platform/tenant/info`,
        name: "根据ID获取租户详情",
        get: function (tenantId) {
            return http.get(this.url + "/" + tenantId);
        }
    },
    listTenantName: {
        url: `${config.API_URL}/platform/tenant/listAllTenantName`,
        name: "无分页查询租户名列表",
        get: function () {
            return http.get(this.url);
        }
    },
    pageListTenant: {
        url: `${config.API_URL}/platform/tenant/pageList`,
        name: "分页查询租户列表",
        get: function (platformTenantQueryVo) {
            return http.get(this.url, platformTenantQueryVo);
        }
    }
}
